<template lang="pug">
  div
    player
    server
    stockPrice
</template>

<script>
import player from '@/components/player'
import stockPrice from '@/components/stockPrice'
import server from '@/components/server'
export default {
  name: 'home',
  components: {
    stockPrice: stockPrice,
    player: player,
    server: server
  },
  data () {
    return {
      data: []
    }
  },
  mounted: function () {
    // this.getData()
  },
  methods: {
    getData: function () {
      let that = this
      that.loading = true
      that.$axios
        .post(that.$root.URL + '/stock')
        .then(function (response) {
          that.data = response.data.data
        })
        .catch(function (error) {
          console.log(error)
          that.loading = false
          that.$message.error(error.toString())
        })
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped></style>
